1. Field of the Invention
The present invention relates to a motion controller for controlling the machining of a workpiece traveling on a conveyor, in synchronization with the motion of the conveyor, and a synchronous control process for that motion controller.
2. Description of the Background Art
A machining system which forms the environment for the present invention is seen in FIG. 3 which is not prior art to the invention, where a conveyor 31 carries a workpiece 30 along a path in a direction D. The movement of the conveyor is detected by an encoder 3, which generates pulses in response to the rotation of a conveyor roller or the movement of the conveyor itself past an internal sensor. A workpiece machining position is at a predetermined location along the path of conveyor movement and there is located before that position a sensor 32 for detecting the presence of the workpiece. A machine tool (not shown) is moved in horizontal and vertical directions by guides 33 and 34, respectively, each operating under control of a servo motor 15. A typical servo-controlled structure using a ball screw for controlling machine tool movement is seen in FIG. 10. The servomotor operates in a servo system that includes the motor 15, a position detector 16, servo amplifiers 14 and a motion control unit 1.
FIG. 7 is a block diagram illustrating a conventional motion controller. Referring to FIG. 7, the motion controller 1 includes an operation processor 2 for generating speed command data for a machine having a tool that is movable to machine the workpiece. A synchronizing encoder is installed on a conveyor or similar transport mechanism and provides feedback pulses to an encoder interface 4, which counts the feedback pulses from the synchronizing encoder 3. A differential processor 5 computes the number of pulses per unit time, based on an input from the encoder interface 4, and provides that quantity to the operation processor 2. External machine switches 6 are connected to an input interface 7 which provides corresponding signals to the operation processor 2. External lamps and indicators (e.g., a counter) 8, receive signals from the operation processor 2 via an output interface 9. A CRT operation panel 10 is operative to interactively enter and modify automatic programs in a program file 11. Speed command data for each of the horizontal and vertical directions is output by the operation processor 2 in square pulse form and is converted into a smooth speed waveform by an acceleration/deceleration processor 12, in order to reduce the mechanical shock which would be caused by attempted instantaneous compliance with the command pulse. The speed command data output by the acceleration/deceleration processor 12 is accumulated by a summing device 13 and comprises position command data. The position command data is input to a summing node 17 of a feedback servo control loop, the node 17 providing a position deviation value to a servo amplifier 14. The servo amplifier output energizes a motor 15 for driving the machine tool in a desired direction for machining the workpiece. A detector 16 generates pulses in accordance with the rotation of the motor 15 and provides the pulses to the summing node 17 of the servo loop. Similar arrangements are provided for controlling both the horizontal and vertical movement of the machine.
FIG. 8(a) provides a programming example for synchronous control using conventional NC language, wherein G90 indicates use of absolute coordinate values in program coordinates, G95 instructs a synchronous feed mode, G01 defines linear interpolation, X and Y define orthogonal directions and are followed by coordinate values of an end point, and F defines a feedrate per revolution of the synchronizing encoder 3, e.g., "F10" specifies a feed of 10 mm per revolution. All of these program inputs must be specified by an operator.
Operation will now be described. When an automatic run mode select signal is entered by the corresponding machine switch 6 and an automatic run start signal is then entered, the operation processor 2 reads a program from the program file 11 and initiates an automatic run. The command data provided at this time by the operation processor 2 is created in proportion to pulses fed back by the encoder 3. Hence, if the conveyor is stopped and there is no feedback pulse from the encoder 3, no command data is output by processor 2 and the motors 15 are also stopped. When the conveyor moves, feedback pulses are generated by the encoder 3 and the command data is generated by processor 2.
The command data must be written in consideration of the movement of the conveyor in order to accurately move the machine tool to a target end point value on the conveyor, as shown in the programming example in FIG. 8(a). For instance, assume that the encoder 3 rotates one turn while the conveyor moves 10 mm and the end point is reached when the conveyor moves 100 mm (the synchronizing encoder 3 rotates 10 turns). In FIGS. 8(a) and 8(b) the solid line arrows indicate the movement of the machine tool which would be required were the workpiece stationary, i.e., not conveyor mounted. The dotted line arrow indicates the actual tool path necessary to compensate for conveyor movement. In FIG. 8(a), the end point (X, Y) is nominally (-100, 0), however the end point changes to (-200, 0) when the movement of the conveyor is considered. The feedrate also changes from F10 to F20 when the movement of the conveyor is considered. The operator must therefore take account of the conveyor speed and accordingly change the machining program.
In FIG. 8(b), where the end point (X, Y) is nominally (0,100), it changes to (-100, 100) when the movement of the conveyor is considered. The feedrate per revolution of the encoder 3 at this time also changes from nominal F10 to F14.142 (=10.times..sqroot.2) when the movement of the conveyor is considered.
As described above, the speed command data for each axis (X, Y) output by the operation processor 2 is converted into a smooth command speed waveform through the acceleration/deceleration processor 12 and is accumulated at summing device 13 in order to create the position command data. The position command data is output to summing node 17 as the command data for a servo processor. The servo processor causes a position loop to be formed using the position deviation value, servo amplifier 14, motor 15 and detector 16 so that the machine tool is moved to the commanded position.
FIGS. 9(a) and 9(b) illustrate the variation of conveyor speed (vertical axis) with time (horizontal axis) beginning with a synchronization start signal. The solid line in each Figure represents actual movement of the machine tool in the X direction, FIG. 9(b) having a higher conveyor speed than FIG. 9(a). For a given conveyor speed, upon occurrence of the synchronization signal, an acceleration/deceleration delay time constant of device 12 will "soften" the speed command and cause a slight delay in the beginning of command execution. The theoretical command line (i.e., the theoretical machine tool speed, taking the delay time constant into consideration) is seen in FIGS. 9(a) and 9(b) as a dotted line, and is referred to as the theoretical delay curve. However, due to inertia, processing time and the like, there will actually be some further delay between the issuance of the synchronization pulse, and time when the machine tool gets up to speed. The actual delay is seen as the solid line in the Figures and illustrates how the actual machine tool speed changes with time, beginning with the occurrence of the synchronization pulse, to eventually achieve a steady state at the desired speed. A period of time will pass between the theoretical delay (dotted line) and the actual movement of the machine tool (solid line). The product of the time (sec) and the speed (mm/sec), i.e., the hatched area in the Figures, corresponds to the distance that the conveyor will move the workpiece before the machine responds to the command. If this delay value is a constant, synchronization between the conveyor/workpiece and machine tool is readily achieved. However, as is evident from comparing FIGS. 9(a) and 9(b), the delay value changes with different conveyor speeds. Thus, in the conventional art, the operator must conduct time runs to determine what delay value should be used. As shown in FIGS. 9(a) and 9(b), the delay value may be represented by the following expression and will depend on the conveyor speed: ##EQU1## where, D=delay value (mm)
Fc=conveyor speed (mm/min.) PA1 Ts=acceleration/deceleration time constant (sec) PA1 Tp=position loop time constant (sec)
In the prior art, it was not possible to account for the delay time other than through experimental test runs, thereby making operation difficult and time consuming.
Another example of this type of controller is disclosed in Japanese Patent Disclosure No. 45887 of 1983. This system can establish speed synchronization but similarly has the disadvantage in that the relative position of the tool and workpiece varies when the conveyor speed changes in real time. A process for controlling a robot in synchronization with a conveyor is disclosed in Japanese Patent Disclosure No. 67605 of 1989. That process operates on a target value by detection of the movement of the conveyor by interpolation. However, the interpolation period must be short in order to enhance the accuracy of synchronization.
The conventional motion controller and the synchronous control process therefore as described above requires a machining program that operates on machining information, e.g., the moving speed, for machining a workpiece on a conveyor, created in consideration of the moving speed of the conveyor. The variation of the motion delay value of the machining device with respect to the moving speed of the conveyor makes it difficult to synchronize the position of the conveyor with that of the machining device if the moving speed of the conveyor varies.